// 正确的导入语句
import domain.Teacher;
import domain.Student;
import domain.Course;

public class TestCourseSelection {
    public static void main(String[] args) {
        // 创建教师
        Teacher teacher1 = new Teacher("T001", "张老师", "男");
        Teacher teacher2 = new Teacher("T002", "王老师", "女");

        // 创建课程
        Course course1 = new Course("C001", "Java 编程", "教学楼 101", "周一 8:00-9:40");
        Course course2 = new Course("C002", "数据结构", "教学楼 102", "周一 10:00-11:40");

        // 教师开课 - 修复方法调用
        course1.setTeacher(teacher1);
        course2.setTeacher(teacher2);
        teacher1.setCourse(course1);
        teacher2.setCourse(course2);

        System.out.println("=== 教师开课信息 ===");
        teacher1.printTeachingInfo();
        teacher2.printTeachingInfo();

        // 创建学生
        Student student1 = new Student("S001", "小黄", "男");
        Student student2 = new Student("S002", "小红", "女");

        // 学生选课 - 修复方法调用
        student1.selectCourse(course1);
        student1.selectCourse(course2);
        student2.selectCourse(course1);

        // 学生退课 - 修复方法调用
        student1.dropCourse(course2);

        // 使用继承后的方法打印课表
        System.out.println("\n=== 学生课表信息 ===");
        student1.printSchedule();
        student2.printSchedule();

        // 验证继承关系 - 调用父类方法
        System.out.println("\n=== 人员基本信息 ===");
        teacher1.printInfo();
        student1.printInfo();
    }
}